<%-- 
    Document   : find_OE
    Created on : 09-04-2012, 03:31:30 PM
    Author     : marco.castro
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib uri="http://www.extremecomponents.org" prefix="ec"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
<jsp:include page="includeCSSjs.jsp"/>
    <script>
        jQuery(document).ready(function(){
            // binds form submission and fields to the validation engine
            jQuery("#frm2").validationEngine();
        });
        function checkHELLO(field, rules, i, options){
            if (field.val() != "HELLO") {
                // this allows to use i18 for the error msgs
                return options.allrules.validate2fields.alertText;
            }
            
            
            
        }
        function onTableClick(nombreCompleto,idEmpleado,nr){
        	$("#nr").val(nr);
        	$("#nombreCompleto").val(nombreCompleto);
        	$("#idEmpleado").val(idEmpleado);
        	
        	showEditBtn();
        	
} 
    </script>
    <body>
      	<font class="divTextoEncabezado">Registro de Expediente</font>
      	<br/>
<form:form method="post"  action="showExpediente" commandName="emp" >
	<table >
		<tr>
			<td>
			<form:label path="nombreCompleto"  class="text0"><b>Empleado</b></form:label>
			<form:hidden path="idEmpleado" id="idEmpleado"/>
			
			</td>
			<td>
			<form:input path="nr" onkeypress="return soloLetras(event)" maxlength="5" size="5" id="nr" class="required inputTextFacturaAgregar"/>
			</td>
			<td>
			<form:input path="nombreCompleto" onkeypress="return soloLetras(event)" id="nombreCompleto"  class="required inputTextFacturaAgregar" />
			</td>
		</tr>
		
		
	</table>
<center>
<br/>

			<div class="btnEditar" style="display:none;">
			<input id="actulizar" type=image src="../resources/img/boton_guardar.png" width="95" height="30" class="inputBoton" onclick="edit('emp','ingresoExpediente?idEmp='+document.getElementById('idEmpleado').value)" />					
		</div>
</center>
</form:form>

		<!-- Extreme Table  -->
<c:if test="${!empty listEmp}">
 		<ec:table 
    items="listEmp"
    action="${pageContext.request.contextPath}/admin/showPersonal"  
    view="compact"
    imagePath="${pageContext.request.contextPath}/resources/images/compact/*.gif"
    rowsDisplayed="8"      
     var="pres" 
      >
             
    <ec:row highlightRow="true"      
     onclick="onTableClick('${pageScope.pres.nombreCompleto}',
     						'${pageScope.pres.idEmpleado}',
     						'${pageScope.pres.nr}');"
  >      
      
      <ec:column property="nombreCompleto"  title="Nombre Completo"/>     
      <ec:column property="nr"  title="NR"/>
      <ec:column property="nitNumero"  title="Numero NIT"/>
      
         
    </ec:row>
  </ec:table>
</c:if>
    </body>
</html>
